-
Notifications
You must be signed in to change notification settings - Fork 769
Checkpoint related columns in PG 17 have been moved from pg_stat_bgwriter to pg_stat_checkpointer #1072
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Checkpoint related columns in PG 17 have been moved from pg_stat_bgwriter to pg_stat_checkpointer #1072
Conversation
9f9dc26
to
40e2774
Compare
40e2774
to
b08b70d
Compare
49b1a80
to
65abcb5
Compare
Hi there! Any news? |
Ping @sysadmind |
65abcb5
to
578f4d6
Compare
@SuperQ @wrouesnel @sysadmind, could you please reiew this PR, it's important for PG17 monitoring. |
Hello, I start a very simple PG16: docker run --rm -p 5416:5432 -e POSTGRES_PASSWORD=postgres postgres:16 -d postgres I have a auth_modules:
monitoring:
type: userpass
userpass:
username: postgres
password: postgres I start the exporter (with the merged PR): ./postgres_exporter --config.file=config.yml --collector.stat_checkpointer and I call the exporter: curl 'http://localhost:9187/probe?auth_module=monitoring&target=localhost:5416/postgres?sslmode=disable' The exporter outputs this error:
I'll try to check how to improve the current PR so it can work in this mode 😄 |
Signed-off-by: Michael Todorovic <[email protected]>
ping @sysadmind @wrouesnel @SuperQ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the code is good and should be good to merge as soon as the Copyright dates are updated.
…iter to pg_stat_checkpointer Fix prometheus-community#1060 See: https://www.dbi-services.com/blog/postgresql-17-new-catalog-view-pg_stat_checkpointer/ Signed-off-by: Nicolas Rodriguez <[email protected]>
See: https://www.dbi-services.com/blog/postgresql-17-new-catalog-view-pg_stat_checkpointer/ Signed-off-by: Nicolas Rodriguez <[email protected]>
Signed-off-by: Nicolas Rodriguez <[email protected]>
578f4d6
to
8a9f10c
Compare
👋 @n-rodriguez , would you please check the changes in n-rodriguez#1? |
The last commit is missing the DCO |
Signed-off-by: Nicolas Rodriguez <[email protected]>
9513603
to
39cd321
Compare
Done :) |
Is there any roadmap to a release that includes this bug fix? |
@sysadmind can we get a release for this fix? 👀 |
Any recommendations for a different Postgres monitoring project, ideally Prometheus-based? This repo is as good as dead. Having to drag one of the maintainers kicking and screaming to merge a couple of PRs every quarter just doesn't cut it for a project that aspires to be the semi-official Postgres exporter. |
can you not just deploy quay.io/prometheuscommunity/postgres-exporter:master? its in there.. |
No. That will definitely be forgotten and byte back in the future. |
On our side, we have built a versionned image with patches coming from existing PRs, waiting for them to be merged. This requires low maintenance but that the current cost to have required feats for our production |
If that can help someone, here's my Dockerfile to build a custom image with PRs patches below. I use it for multi-target setup with consul service discovery, hosted in k8s. You're free to use it the way you prefer, the image doesn't force anything 😄 FROM golang:1.23.0 AS build
ARG UPSTREAM_REPO=github.com/prometheus-community/postgres_exporter
ARG SOFTWARE_VERSION=v0.16.0
WORKDIR ${GOPATH}/src/${UPSTREAM_REPO}
RUN apt-get update -qyy && apt install -qyy --no-install-recommends patch curl git ca-certificates
RUN git clone https://${UPSTREAM_REPO} ${GOPATH}/src/${UPSTREAM_REPO} && git checkout ${SOFTWARE_VERSION}
# index collector
RUN curl -s -f https://patch-diff.githubusercontent.com/raw/prometheus-community/postgres_exporter/pull/1071.diff | patch -p1 -i -
# pg17 fix about checkpointer
RUN curl -s -f https://patch-diff.githubusercontent.com/raw/prometheus-community/postgres_exporter/pull/1072.diff | patch -p1 -i -
# fix for #1072 to handle pg<17
RUN curl -s -f https://patch-diff.githubusercontent.com/raw/n-rodriguez/postgres_exporter/pull/1.diff | patch -p1 -i -
# fix: handle pg_replication_slots on pg<13
RUN curl -s -f https://patch-diff.githubusercontent.com/raw/prometheus-community/postgres_exporter/pull/1098.diff | patch -p1 -i -
RUN make build
FROM busybox:stable
COPY --from=build /go/src/github.com/prometheus-community/postgres_exporter/postgres_exporter /bin/postgres_exporter
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
ENTRYPOINT [ "/bin/postgres_exporter" ] |
We need this to be released, for adequate Postgres 17 support! |
I have a release staged. It looks like #1112 would be important to merge before the release, but needs a fix for the tests. I'm hoping to have the next release out this week and then take another pass to review open PRs here. |
Thank you @sysadmind !! 🎉 🚀 |
Sadly I don't appear in contributors list : https://github.com/prometheus-community/postgres_exporter/releases/tag/v0.17.0 😢 (I think because of the typo: |
I fixed the typo. I see you show up in the list. |
Fix #1060
See:
Thank you!